<template>
	<view class="content">
		<uni-list v-for="(item,index) in list" :key="index">
			<uni-badge :text="item.id" size="small" absolute="rightTop" :offset="[31,31]">
				<uni-list-item :title="item.name" 
				:thumb="'/static/images/cat-6.png'" thumbSize="lg" :note="item.department" :to='"../classdetail/classdetail?id="+item.id'>
				</uni-list-item>
			</uni-badge>
		</uni-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				"list": []
			}
		},
		onLoad() {
			uni.request({
				url: 'http://localhost:8090/freshmenapp/user/list',
				method: 'POST',
				data: this.list,
				success: res => {
					if (res.data.success) {
						this.list = res.data.list
						uni.showToast({
							title: '成功',

						});
					} else {
						uni.showToast({
							title: '失败',
							icon: 'none'
						});
					}
				},
				fail: () => {
					uni.showToast({
						title: '失败',
						icon: 'none'
					});
				},
				complete: () => {}
			});
		},
		methods: {

		}
	}
</script>

<style>

</style>